#include <iostream>
#include <math.h>

using namespace std;


int T;      ///so luong test
int t;      ///so lan test hien tai
long KQ[100];///mang chua cac ket qua
long N;      ///tap hop N so nguyen {1, 2, 3, ..., N}


///kiem tra so n co la so nguyen to hay k?
int isPrime(long n){
    int check=1;
    for(int i=2; i<=sqrt(n);i++)
        if(n%i==0)
            check=0;
    return check;
}

///dem so luong so nguyen to <= N
long countPrimes(long N){
    long dem=0;
    for(long i=1;i<=N;i+=2)
        if(isPrime(i)){
            dem++;
            cout<<i<<" ";
        }

    return dem;
}

int main() {
    T=1;
    //cin>>T;
    t=0;
    while(t<T) {
        N=1000000;
        //cin>>N;

        KQ[t]=countPrimes(N);
        t++;
    }
    t=0;
    while(t<T) {
        cout<<"Case #"<<t+1<<": "<<KQ[t]<<endl;
        t++;
    }

    return 0;
}
